/**
 * 监控设备信息管理 API
 * @type {BaseMonitorDeviceApi}
 */
const baseMonitorDeviceApi = new class BaseMonitorDeviceApi extends BaseApi {
    constructor() {
        super({
            url: '/api/baseMonitorDevice',
            exp: true,
            imp: true,
        })
    }

    async getAndIpList(id) {
        return (await rxajax.get(this.using(`/get-and-ip-list/${id}`))).data.data
    }

    async refreshServerInfo(host) {
        return (await rxajax.get(this.using(`/refresh-server-info/${host}`))).data.data
    }

    async updateAndIpList(entity) {
        return (await rxajax.post(this.using('/update-and-ip-list'), entity, {type: 'json'})).data
    }
}()
